<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE GADTs #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE RankNTypes, ScopedTypeVariables #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# OPTIONS_GHC -fno-warn-name-shadowing #-}</span><span>
</span><span id="line-4"></span><span>
</span><span id="line-5"></span><span class="hs-comment">--</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- (c) The University of Glasgow 2002-2006</span><span>
</span><span id="line-7"></span><span class="hs-comment">--</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Serialized values</span><span>
</span><span id="line-9"></span><span>
</span><span id="line-10"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Serialized</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-11"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Main Serialized data type</span></span><span>
</span><span id="line-12"></span><span>    </span><span class="annot"><a href="GHC.Serialized.html#Serialized"><span class="hs-identifier">Serialized</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>
</span><span id="line-14"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Going into and out of 'Serialized'</span></span><span>
</span><span id="line-15"></span><span>    </span><span class="annot"><a href="GHC.Serialized.html#toSerialized"><span class="hs-identifier">toSerialized</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Serialized.html#fromSerialized"><span class="hs-identifier">fromSerialized</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Handy serialization functions</span></span><span>
</span><span id="line-18"></span><span>    </span><span class="annot"><a href="GHC.Serialized.html#serializeWithData"><span class="hs-identifier">serializeWithData</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Serialized.html#deserializeWithData"><span class="hs-identifier">deserializeWithData</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-comment">-- See note [Why do we import Prelude here?]</span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Bits.html#"><span class="hs-identifier">Data.Bits</span></a></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Word.html#"><span class="hs-identifier">Data.Word</span></a></span><span>        </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier">Word8</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#"><span class="hs-identifier">Data.Data</span></a></span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span class="hs-comment">-- | Represents a serialized value of a particular type. Attempts can be made to deserialize it at certain types</span><span>
</span><span id="line-28"></span><span class="hs-keyword">data</span><span> </span><span id="Serialized"><span class="annot"><a href="GHC.Serialized.html#Serialized"><span class="hs-identifier hs-var">Serialized</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Serialized"><span class="annot"><a href="GHC.Serialized.html#Serialized"><span class="hs-identifier hs-var">Serialized</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.html#TypeRep"><span class="hs-identifier hs-type">TypeRep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span class="hs-comment">-- | Put a Typeable value that we are able to actually turn into bytes into a 'Serialized' value ready for deserialization later</span><span>
</span><span id="line-31"></span><span class="annot"><a href="GHC.Serialized.html#toSerialized"><span class="hs-identifier hs-type">toSerialized</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621679059679"><span class="annot"><a href="#local-6989586621679059679"><span class="hs-identifier hs-type">a</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.Internal.html#Typeable"><span class="hs-identifier hs-type">Typeable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059679"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679059679"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059679"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Serialized.html#Serialized"><span class="hs-identifier hs-type">Serialized</span></a></span><span>
</span><span id="line-32"></span><span id="toSerialized"><span class="annot"><span class="annottext">toSerialized :: forall a. Typeable a =&gt; (a -&gt; [Word8]) -&gt; a -&gt; Serialized
</span><a href="GHC.Serialized.html#toSerialized"><span class="hs-identifier hs-var hs-var">toSerialized</span></a></span></span><span> </span><span id="local-6989586621679059535"><span class="annot"><span class="annottext">a -&gt; [Word8]
</span><a href="#local-6989586621679059535"><span class="hs-identifier hs-var">serialize</span></a></span></span><span> </span><span id="local-6989586621679059534"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059534"><span class="hs-identifier hs-var">what</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TypeRep -&gt; [Word8] -&gt; Serialized
</span><a href="GHC.Serialized.html#Serialized"><span class="hs-identifier hs-var">Serialized</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; TypeRep
forall a. Typeable a =&gt; a -&gt; TypeRep
</span><a href="../../base/src/Data.Typeable.html#typeOf"><span class="hs-identifier hs-var">typeOf</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059534"><span class="hs-identifier hs-var">what</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; [Word8]
</span><a href="#local-6989586621679059535"><span class="hs-identifier hs-var">serialize</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059534"><span class="hs-identifier hs-var">what</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-33"></span><span>
</span><span id="line-34"></span><span class="hs-comment">-- | If the 'Serialized' value contains something of the given type, then use the specified deserializer to return @Just@ that.</span><span>
</span><span id="line-35"></span><span class="hs-comment">-- Otherwise return @Nothing@.</span><span>
</span><span id="line-36"></span><span class="annot"><a href="GHC.Serialized.html#fromSerialized"><span class="hs-identifier hs-type">fromSerialized</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621679059674"><span class="annot"><a href="#local-6989586621679059674"><span class="hs-identifier hs-type">a</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.Internal.html#Typeable"><span class="hs-identifier hs-type">Typeable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059674"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059674"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Serialized.html#Serialized"><span class="hs-identifier hs-type">Serialized</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059674"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-37"></span><span id="fromSerialized"><span class="annot"><span class="annottext">fromSerialized :: forall a. Typeable a =&gt; ([Word8] -&gt; a) -&gt; Serialized -&gt; Maybe a
</span><a href="GHC.Serialized.html#fromSerialized"><span class="hs-identifier hs-var hs-var">fromSerialized</span></a></span></span><span> </span><span id="local-6989586621679059528"><span class="annot"><span class="annottext">[Word8] -&gt; a
</span><a href="#local-6989586621679059528"><span class="hs-identifier hs-var">deserialize</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Serialized.html#Serialized"><span class="hs-identifier hs-type">Serialized</span></a></span><span> </span><span id="local-6989586621679059527"><span class="annot"><span class="annottext">TypeRep
</span><a href="#local-6989586621679059527"><span class="hs-identifier hs-var">the_type</span></a></span></span><span> </span><span id="local-6989586621679059526"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059526"><span class="hs-identifier hs-var">bytes</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-38"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">TypeRep
</span><a href="#local-6989586621679059527"><span class="hs-identifier hs-var">the_type</span></a></span><span> </span><span class="annot"><span class="annottext">TypeRep -&gt; TypeRep -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">TypeRep
</span><a href="#local-6989586621679059525"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Word8] -&gt; a
</span><a href="#local-6989586621679059528"><span class="hs-identifier hs-var">deserialize</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059526"><span class="hs-identifier hs-var">bytes</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-39"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-40"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679059525"><span class="annot"><span class="annottext">rep :: TypeRep
</span><a href="#local-6989586621679059525"><span class="hs-identifier hs-var hs-var">rep</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Proxy a -&gt; TypeRep
forall {k} (proxy :: k -&gt; *) (a :: k).
Typeable a =&gt;
proxy a -&gt; TypeRep
</span><a href="../../base/src/Data.Typeable.html#typeRep"><span class="hs-identifier hs-var">typeRep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Proxy a
forall {k} (t :: k). Proxy t
</span><a href="../../base/src/Data.Proxy.html#Proxy"><span class="hs-identifier hs-var">Proxy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Data.Proxy.html#Proxy"><span class="hs-identifier hs-type">Proxy</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059674"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-41"></span><span>
</span><span id="line-42"></span><span class="hs-comment">-- | Use a 'Data' instance to implement a serialization scheme dual to that of 'deserializeWithData'</span><span>
</span><span id="line-43"></span><span id="local-6989586621679059664"><span class="annot"><a href="GHC.Serialized.html#serializeWithData"><span class="hs-identifier hs-type">serializeWithData</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-type">Data</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059664"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059664"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-44"></span><span id="serializeWithData"><span class="annot"><span class="annottext">serializeWithData :: forall a. Data a =&gt; a -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeWithData"><span class="hs-identifier hs-var hs-var">serializeWithData</span></a></span></span><span> </span><span id="local-6989586621679059520"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059520"><span class="hs-identifier hs-var">what</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; [Word8] -&gt; [Word8]
forall a. Data a =&gt; a -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeWithData%27"><span class="hs-identifier hs-var">serializeWithData'</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059520"><span class="hs-identifier hs-var">what</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-45"></span><span>
</span><span id="line-46"></span><span id="local-6989586621679059662"><span class="annot"><a href="GHC.Serialized.html#serializeWithData%27"><span class="hs-identifier hs-type">serializeWithData'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-type">Data</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059662"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059662"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-47"></span><span id="serializeWithData%27"><span class="annot"><span class="annottext">serializeWithData' :: forall a. Data a =&gt; a -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeWithData%27"><span class="hs-identifier hs-var hs-var">serializeWithData'</span></a></span></span><span> </span><span id="local-6989586621679059516"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059516"><span class="hs-identifier hs-var">what</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([Word8] -&gt; [Word8], a) -&gt; [Word8] -&gt; [Word8]
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">(([Word8] -&gt; [Word8], a) -&gt; [Word8] -&gt; [Word8])
-&gt; ([Word8] -&gt; [Word8], a) -&gt; [Word8] -&gt; [Word8]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(forall d b.
 Data d =&gt;
 ([Word8] -&gt; [Word8], d -&gt; b) -&gt; d -&gt; ([Word8] -&gt; [Word8], b))
-&gt; (forall g. g -&gt; ([Word8] -&gt; [Word8], g))
-&gt; a
-&gt; ([Word8] -&gt; [Word8], a)
forall a (c :: * -&gt; *).
Data a =&gt;
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; a -&gt; c a
</span><a href="../../base/src/Data.Data.html#gfoldl"><span class="hs-identifier hs-var">gfoldl</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679059512"><span class="annot"><span class="annottext">[Word8] -&gt; [Word8]
</span><a href="#local-6989586621679059512"><span class="hs-identifier hs-var">before</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679059511"><span class="annot"><span class="annottext">d -&gt; b
</span><a href="#local-6989586621679059511"><span class="hs-identifier hs-var">a_to_b</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679059510"><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679059510"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Word8] -&gt; [Word8]
</span><a href="#local-6989586621679059512"><span class="hs-identifier hs-var">before</span></a></span><span> </span><span class="annot"><span class="annottext">([Word8] -&gt; [Word8]) -&gt; ([Word8] -&gt; [Word8]) -&gt; [Word8] -&gt; [Word8]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">d -&gt; [Word8] -&gt; [Word8]
forall a. Data a =&gt; a -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeWithData%27"><span class="hs-identifier hs-var">serializeWithData'</span></a></span><span> </span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679059510"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">d -&gt; b
</span><a href="#local-6989586621679059511"><span class="hs-identifier hs-var">a_to_b</span></a></span><span> </span><span class="annot"><span class="annottext">d
</span><a href="#local-6989586621679059510"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-48"></span><span>                                       </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679059507"><span class="annot"><span class="annottext">g
</span><a href="#local-6989586621679059507"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConstrRep -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeConstr"><span class="hs-identifier hs-var">serializeConstr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Constr -&gt; ConstrRep
</span><a href="../../base/src/Data.Data.html#constrRep"><span class="hs-identifier hs-var">constrRep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Constr
forall a. Data a =&gt; a -&gt; Constr
</span><a href="../../base/src/Data.Data.html#toConstr"><span class="hs-identifier hs-var">toConstr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059516"><span class="hs-identifier hs-var">what</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">g
</span><a href="#local-6989586621679059507"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-49"></span><span>                                       </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059516"><span class="hs-identifier hs-var">what</span></a></span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span class="hs-comment">-- | Use a 'Data' instance to implement a deserialization scheme dual to that of 'serializeWithData'</span><span>
</span><span id="line-52"></span><span id="local-6989586621679059642"><span class="annot"><a href="GHC.Serialized.html#deserializeWithData"><span class="hs-identifier hs-type">deserializeWithData</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-type">Data</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059642"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059642"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-53"></span><span id="deserializeWithData"><span class="annot"><span class="annottext">deserializeWithData :: forall a. Data a =&gt; [Word8] -&gt; a
</span><a href="GHC.Serialized.html#deserializeWithData"><span class="hs-identifier hs-var hs-var">deserializeWithData</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([Word8], a) -&gt; a
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="annot"><span class="annottext">(([Word8], a) -&gt; a) -&gt; ([Word8] -&gt; ([Word8], a)) -&gt; [Word8] -&gt; a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; ([Word8], a)
forall a. Data a =&gt; [Word8] -&gt; ([Word8], a)
</span><a href="GHC.Serialized.html#deserializeWithData%27"><span class="hs-identifier hs-var">deserializeWithData'</span></a></span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span class="annot"><a href="GHC.Serialized.html#deserializeWithData%27"><span class="hs-identifier hs-type">deserializeWithData'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621679059638"><span class="annot"><a href="#local-6989586621679059638"><span class="hs-identifier hs-type">a</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-type">Data</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059638"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679059638"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-56"></span><span id="deserializeWithData%27"><span class="annot"><span class="annottext">deserializeWithData' :: forall a. Data a =&gt; [Word8] -&gt; ([Word8], a)
</span><a href="GHC.Serialized.html#deserializeWithData%27"><span class="hs-identifier hs-var hs-var">deserializeWithData'</span></a></span></span><span> </span><span id="local-6989586621679059495"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059495"><span class="hs-identifier hs-var">bytes</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; (ConstrRep -&gt; [Word8] -&gt; ([Word8], a)) -&gt; ([Word8], a)
forall a. [Word8] -&gt; (ConstrRep -&gt; [Word8] -&gt; a) -&gt; a
</span><a href="GHC.Serialized.html#deserializeConstr"><span class="hs-identifier hs-var">deserializeConstr</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059495"><span class="hs-identifier hs-var">bytes</span></a></span><span> </span><span class="annot"><span class="annottext">((ConstrRep -&gt; [Word8] -&gt; ([Word8], a)) -&gt; ([Word8], a))
-&gt; (ConstrRep -&gt; [Word8] -&gt; ([Word8], a)) -&gt; ([Word8], a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679059493"><span class="annot"><span class="annottext">ConstrRep
</span><a href="#local-6989586621679059493"><span class="hs-identifier hs-var">constr_rep</span></a></span></span><span> </span><span id="local-6989586621679059492"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059492"><span class="hs-identifier hs-var">bytes</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-57"></span><span>                             </span><span class="annot"><span class="annottext">(forall b r. Data b =&gt; ([Word8], b -&gt; r) -&gt; ([Word8], r))
-&gt; (forall r. r -&gt; ([Word8], r)) -&gt; Constr -&gt; ([Word8], a)
forall a (c :: * -&gt; *).
Data a =&gt;
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c a
</span><a href="../../base/src/Data.Data.html#gunfold"><span class="hs-identifier hs-var">gunfold</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679059488"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059488"><span class="hs-identifier hs-var">bytes</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679059487"><span class="annot"><span class="annottext">b -&gt; r
</span><a href="#local-6989586621679059487"><span class="hs-identifier hs-var">b_to_r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679059486"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059486"><span class="hs-identifier hs-var">bytes'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679059485"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679059485"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; ([Word8], b)
forall a. Data a =&gt; [Word8] -&gt; ([Word8], a)
</span><a href="GHC.Serialized.html#deserializeWithData%27"><span class="hs-identifier hs-var">deserializeWithData'</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059488"><span class="hs-identifier hs-var">bytes</span></a></span><span> </span><span class="hs-keyword">in</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059486"><span class="hs-identifier hs-var">bytes'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">b -&gt; r
</span><a href="#local-6989586621679059487"><span class="hs-identifier hs-var">b_to_r</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679059485"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-58"></span><span>                                     </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679059484"><span class="annot"><span class="annottext">r
</span><a href="#local-6989586621679059484"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059492"><span class="hs-identifier hs-var">bytes</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">r
</span><a href="#local-6989586621679059484"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-59"></span><span>                                     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataType -&gt; ConstrRep -&gt; Constr
</span><a href="../../base/src/Data.Data.html#repConstr"><span class="hs-identifier hs-var">repConstr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; DataType
forall a. Data a =&gt; a -&gt; DataType
</span><a href="../../base/src/Data.Data.html#dataTypeOf"><span class="hs-identifier hs-var">dataTypeOf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
forall a. HasCallStack =&gt; a
</span><a href="../../base/src/GHC.Err.html#undefined"><span class="hs-identifier hs-var">undefined</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679059638"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ConstrRep
</span><a href="#local-6989586621679059493"><span class="hs-identifier hs-var">constr_rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-60"></span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span class="annot"><a href="GHC.Serialized.html#serializeConstr"><span class="hs-identifier hs-type">serializeConstr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#ConstrRep"><span class="hs-identifier hs-type">ConstrRep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-63"></span><span id="serializeConstr"><span class="annot"><span class="annottext">serializeConstr :: ConstrRep -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeConstr"><span class="hs-identifier hs-var hs-var">serializeConstr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Data.html#AlgConstr"><span class="hs-identifier hs-type">AlgConstr</span></a></span><span> </span><span id="local-6989586621679059479"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679059479"><span class="hs-identifier hs-var">ix</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeWord8"><span class="hs-identifier hs-var">serializeWord8</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">([Word8] -&gt; [Word8]) -&gt; ([Word8] -&gt; [Word8]) -&gt; [Word8] -&gt; [Word8]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeInt"><span class="hs-identifier hs-var">serializeInt</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679059479"><span class="hs-identifier hs-var">ix</span></a></span><span>
</span><span id="line-64"></span><span class="annot"><a href="GHC.Serialized.html#serializeConstr"><span class="hs-identifier hs-var">serializeConstr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Data.html#IntConstr"><span class="hs-identifier hs-type">IntConstr</span></a></span><span> </span><span id="local-6989586621679059475"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679059475"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeWord8"><span class="hs-identifier hs-var">serializeWord8</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">([Word8] -&gt; [Word8]) -&gt; ([Word8] -&gt; [Word8]) -&gt; [Word8] -&gt; [Word8]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeInteger"><span class="hs-identifier hs-var">serializeInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679059475"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-65"></span><span class="annot"><a href="GHC.Serialized.html#serializeConstr"><span class="hs-identifier hs-var">serializeConstr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Data.html#FloatConstr"><span class="hs-identifier hs-type">FloatConstr</span></a></span><span> </span><span id="local-6989586621679059472"><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621679059472"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeWord8"><span class="hs-identifier hs-var">serializeWord8</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">3</span></span><span> </span><span class="annot"><span class="annottext">([Word8] -&gt; [Word8]) -&gt; ([Word8] -&gt; [Word8]) -&gt; [Word8] -&gt; [Word8]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Rational -&gt; [Word8] -&gt; [Word8]
forall a. Real a =&gt; a -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeRational"><span class="hs-identifier hs-var">serializeRational</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621679059472"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-66"></span><span class="annot"><a href="GHC.Serialized.html#serializeConstr"><span class="hs-identifier hs-var">serializeConstr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Data.html#CharConstr"><span class="hs-identifier hs-type">CharConstr</span></a></span><span> </span><span id="local-6989586621679059469"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679059469"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeWord8"><span class="hs-identifier hs-var">serializeWord8</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">4</span></span><span> </span><span class="annot"><span class="annottext">([Word8] -&gt; [Word8]) -&gt; ([Word8] -&gt; [Word8]) -&gt; [Word8] -&gt; [Word8]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeChar"><span class="hs-identifier hs-var">serializeChar</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679059469"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span>
</span><span id="line-69"></span><span id="local-6989586621679059635"><span class="annot"><a href="GHC.Serialized.html#deserializeConstr"><span class="hs-identifier hs-type">deserializeConstr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Data.html#ConstrRep"><span class="hs-identifier hs-type">ConstrRep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059635"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059635"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-70"></span><span id="deserializeConstr"><span class="annot"><span class="annottext">deserializeConstr :: forall a. [Word8] -&gt; (ConstrRep -&gt; [Word8] -&gt; a) -&gt; a
</span><a href="GHC.Serialized.html#deserializeConstr"><span class="hs-identifier hs-var hs-var">deserializeConstr</span></a></span></span><span> </span><span id="local-6989586621679059450"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059450"><span class="hs-identifier hs-var">bytes</span></a></span></span><span> </span><span id="local-6989586621679059449"><span class="annot"><span class="annottext">ConstrRep -&gt; [Word8] -&gt; a
</span><a href="#local-6989586621679059449"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; (Word8 -&gt; [Word8] -&gt; a) -&gt; a
forall a. [Word8] -&gt; (Word8 -&gt; [Word8] -&gt; a) -&gt; a
</span><a href="GHC.Serialized.html#deserializeWord8"><span class="hs-identifier hs-var">deserializeWord8</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059450"><span class="hs-identifier hs-var">bytes</span></a></span><span> </span><span class="annot"><span class="annottext">((Word8 -&gt; [Word8] -&gt; a) -&gt; a) -&gt; (Word8 -&gt; [Word8] -&gt; a) -&gt; a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679059447"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679059447"><span class="hs-identifier hs-var">constr_ix</span></a></span></span><span> </span><span id="local-6989586621679059446"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059446"><span class="hs-identifier hs-var">bytes</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-71"></span><span>                            </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679059447"><span class="hs-identifier hs-var">constr_ix</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-72"></span><span>                                </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">1</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; (Int -&gt; [Word8] -&gt; a) -&gt; a
forall a. [Word8] -&gt; (Int -&gt; [Word8] -&gt; a) -&gt; a
</span><a href="GHC.Serialized.html#deserializeInt"><span class="hs-identifier hs-var">deserializeInt</span></a></span><span>      </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059446"><span class="hs-identifier hs-var">bytes</span></a></span><span> </span><span class="annot"><span class="annottext">((Int -&gt; [Word8] -&gt; a) -&gt; a) -&gt; (Int -&gt; [Word8] -&gt; a) -&gt; a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679059444"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679059444"><span class="hs-identifier hs-var">ix</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ConstrRep -&gt; [Word8] -&gt; a
</span><a href="#local-6989586621679059449"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; ConstrRep
</span><a href="../../base/src/Data.Data.html#AlgConstr"><span class="hs-identifier hs-var">AlgConstr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679059444"><span class="hs-identifier hs-var">ix</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-73"></span><span>                                </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">2</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; (Integer -&gt; [Word8] -&gt; a) -&gt; a
forall a. [Word8] -&gt; (Integer -&gt; [Word8] -&gt; a) -&gt; a
</span><a href="GHC.Serialized.html#deserializeInteger"><span class="hs-identifier hs-var">deserializeInteger</span></a></span><span>  </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059446"><span class="hs-identifier hs-var">bytes</span></a></span><span> </span><span class="annot"><span class="annottext">((Integer -&gt; [Word8] -&gt; a) -&gt; a) -&gt; (Integer -&gt; [Word8] -&gt; a) -&gt; a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679059442"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679059442"><span class="hs-identifier hs-var">i</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ConstrRep -&gt; [Word8] -&gt; a
</span><a href="#local-6989586621679059449"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; ConstrRep
</span><a href="../../base/src/Data.Data.html#IntConstr"><span class="hs-identifier hs-var">IntConstr</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679059442"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-74"></span><span>                                </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">3</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; (Rational -&gt; [Word8] -&gt; a) -&gt; a
forall a b. Fractional a =&gt; [Word8] -&gt; (a -&gt; [Word8] -&gt; b) -&gt; b
</span><a href="GHC.Serialized.html#deserializeRational"><span class="hs-identifier hs-var">deserializeRational</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059446"><span class="hs-identifier hs-var">bytes</span></a></span><span> </span><span class="annot"><span class="annottext">((Rational -&gt; [Word8] -&gt; a) -&gt; a)
-&gt; (Rational -&gt; [Word8] -&gt; a) -&gt; a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679059440"><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621679059440"><span class="hs-identifier hs-var">r</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ConstrRep -&gt; [Word8] -&gt; a
</span><a href="#local-6989586621679059449"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Rational -&gt; ConstrRep
</span><a href="../../base/src/Data.Data.html#FloatConstr"><span class="hs-identifier hs-var">FloatConstr</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621679059440"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-75"></span><span>                                </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">4</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; (Char -&gt; [Word8] -&gt; a) -&gt; a
forall a. [Word8] -&gt; (Char -&gt; [Word8] -&gt; a) -&gt; a
</span><a href="GHC.Serialized.html#deserializeChar"><span class="hs-identifier hs-var">deserializeChar</span></a></span><span>     </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059446"><span class="hs-identifier hs-var">bytes</span></a></span><span> </span><span class="annot"><span class="annottext">((Char -&gt; [Word8] -&gt; a) -&gt; a) -&gt; (Char -&gt; [Word8] -&gt; a) -&gt; a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679059438"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679059438"><span class="hs-identifier hs-var">c</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ConstrRep -&gt; [Word8] -&gt; a
</span><a href="#local-6989586621679059449"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; ConstrRep
</span><a href="../../base/src/Data.Data.html#CharConstr"><span class="hs-identifier hs-var">CharConstr</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679059438"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-76"></span><span>                                </span><span id="local-6989586621679059437"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679059437"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; a
forall a. HasCallStack =&gt; [Char] -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">([Char] -&gt; a) -&gt; [Char] -&gt; a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;deserializeConstr: unrecognised serialized constructor type &quot;</span></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; [Char]
forall a. Show a =&gt; a -&gt; [Char]
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679059437"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot; in context &quot;</span></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; [Char]
forall a. Show a =&gt; a -&gt; [Char]
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059446"><span class="hs-identifier hs-var">bytes</span></a></span><span>
</span><span id="line-77"></span><span>
</span><span id="line-78"></span><span>
</span><span id="line-79"></span><span class="annot"><a href="GHC.Serialized.html#serializeFixedWidthNum"><span class="hs-identifier hs-type">serializeFixedWidthNum</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621679059610"><span class="annot"><a href="#local-6989586621679059610"><span class="hs-identifier hs-type">a</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059610"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Bits.html#FiniteBits"><span class="hs-identifier hs-type">FiniteBits</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059610"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059610"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-80"></span><span id="serializeFixedWidthNum"><span class="annot"><span class="annottext">serializeFixedWidthNum :: forall a. (Integral a, FiniteBits a) =&gt; a -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeFixedWidthNum"><span class="hs-identifier hs-var hs-var">serializeFixedWidthNum</span></a></span></span><span> </span><span id="local-6989586621679059413"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059413"><span class="hs-identifier hs-var">what</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; a -&gt; [Word8] -&gt; [Word8]
</span><a href="#local-6989586621679059412"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Int
forall b. FiniteBits b =&gt; b -&gt; Int
</span><a href="../../base/src/Data.Bits.html#finiteBitSize"><span class="hs-identifier hs-var">finiteBitSize</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059413"><span class="hs-identifier hs-var">what</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059413"><span class="hs-identifier hs-var">what</span></a></span><span>
</span><span id="line-81"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-82"></span><span>    </span><span class="annot"><a href="#local-6989586621679059412"><span class="hs-identifier hs-type">go</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059610"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-83"></span><span>    </span><span id="local-6989586621679059412"><span class="annot"><span class="annottext">go :: Int -&gt; a -&gt; [Word8] -&gt; [Word8]
</span><a href="#local-6989586621679059412"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679059410"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679059410"><span class="hs-identifier hs-var">size</span></a></span></span><span> </span><span id="local-6989586621679059409"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059409"><span class="hs-identifier hs-var">current</span></a></span></span><span> </span><span id="local-6989586621679059408"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059408"><span class="hs-identifier hs-var">rest</span></a></span></span><span>
</span><span id="line-84"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679059410"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059408"><span class="hs-identifier hs-var">rest</span></a></span><span>
</span><span id="line-85"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059409"><span class="hs-identifier hs-var">current</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">255</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; [Word8] -&gt; [Word8]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; a -&gt; [Word8] -&gt; [Word8]
</span><a href="#local-6989586621679059412"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679059410"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059409"><span class="hs-identifier hs-var">current</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Int -&gt; a
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059408"><span class="hs-identifier hs-var">rest</span></a></span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span class="annot"><a href="GHC.Serialized.html#deserializeFixedWidthNum"><span class="hs-identifier hs-type">deserializeFixedWidthNum</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621679059599"><span class="annot"><a href="#local-6989586621679059599"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span id="local-6989586621679059598"><span class="annot"><a href="#local-6989586621679059598"><span class="hs-identifier hs-type">b</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059599"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Bits.html#FiniteBits"><span class="hs-identifier hs-type">FiniteBits</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059599"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679059599"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059598"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059598"><span class="hs-identifier hs-type">b</span></a></span><span>
</span><span id="line-88"></span><span id="deserializeFixedWidthNum"><span class="annot"><span class="annottext">deserializeFixedWidthNum :: forall a b.
(Integral a, FiniteBits a) =&gt;
[Word8] -&gt; (a -&gt; [Word8] -&gt; b) -&gt; b
</span><a href="GHC.Serialized.html#deserializeFixedWidthNum"><span class="hs-identifier hs-var hs-var">deserializeFixedWidthNum</span></a></span></span><span> </span><span id="local-6989586621679059383"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059383"><span class="hs-identifier hs-var">bytes</span></a></span></span><span> </span><span id="local-6989586621679059382"><span class="annot"><span class="annottext">a -&gt; [Word8] -&gt; b
</span><a href="#local-6989586621679059382"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [Word8] -&gt; (a -&gt; [Word8] -&gt; b) -&gt; b
</span><a href="#local-6989586621679059381"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Int
forall b. FiniteBits b =&gt; b -&gt; Int
</span><a href="../../base/src/Data.Bits.html#finiteBitSize"><span class="hs-identifier hs-var">finiteBitSize</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
forall a. HasCallStack =&gt; a
</span><a href="../../base/src/GHC.Err.html#undefined"><span class="hs-identifier hs-var">undefined</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679059599"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059383"><span class="hs-identifier hs-var">bytes</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [Word8] -&gt; b
</span><a href="#local-6989586621679059382"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-89"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-90"></span><span>    </span><span class="annot"><a href="#local-6989586621679059381"><span class="hs-identifier hs-type">go</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679059599"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059598"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059598"><span class="hs-identifier hs-type">b</span></a></span><span>
</span><span id="line-91"></span><span>    </span><span id="local-6989586621679059381"><span class="annot"><span class="annottext">go :: Int -&gt; [Word8] -&gt; (a -&gt; [Word8] -&gt; b) -&gt; b
</span><a href="#local-6989586621679059381"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679059380"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679059380"><span class="hs-identifier hs-var">size</span></a></span></span><span> </span><span id="local-6989586621679059379"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059379"><span class="hs-identifier hs-var">bytes</span></a></span></span><span> </span><span id="local-6989586621679059378"><span class="annot"><span class="annottext">a -&gt; [Word8] -&gt; b
</span><a href="#local-6989586621679059378"><span class="hs-identifier hs-var">k</span></a></span></span><span>
</span><span id="line-92"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679059380"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; [Word8] -&gt; b
</span><a href="#local-6989586621679059378"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059379"><span class="hs-identifier hs-var">bytes</span></a></span><span>
</span><span id="line-93"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059379"><span class="hs-identifier hs-var">bytes</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-94"></span><span>                        </span><span class="hs-special">(</span><span id="local-6989586621679059377"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679059377"><span class="hs-identifier hs-var">byte</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679059376"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059376"><span class="hs-identifier hs-var">bytes</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [Word8] -&gt; (a -&gt; [Word8] -&gt; b) -&gt; b
</span><a href="#local-6989586621679059381"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679059380"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059376"><span class="hs-identifier hs-var">bytes</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679059375"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059375"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; [Word8] -&gt; b
</span><a href="#local-6989586621679059378"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059375"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Int -&gt; a
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%7C."><span class="hs-operator hs-var">.|.</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; a
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679059377"><span class="hs-identifier hs-var">byte</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-95"></span><span>                        </span><span class="hs-special">[</span><span class="hs-special">]</span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; b
forall a. HasCallStack =&gt; [Char] -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;deserializeFixedWidthNum: unexpected end of stream&quot;</span></span><span>
</span><span id="line-96"></span><span>
</span><span id="line-97"></span><span>
</span><span id="line-98"></span><span id="local-6989586621679059595"><span class="annot"><a href="GHC.Serialized.html#serializeEnum"><span class="hs-identifier hs-type">serializeEnum</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Enum.html#Enum"><span class="hs-identifier hs-type">Enum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059595"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059595"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-99"></span><span id="serializeEnum"><span class="annot"><span class="annottext">serializeEnum :: forall a. Enum a =&gt; a -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeEnum"><span class="hs-identifier hs-var hs-var">serializeEnum</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeInt"><span class="hs-identifier hs-var">serializeInt</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; [Word8] -&gt; [Word8])
-&gt; (a -&gt; Int) -&gt; a -&gt; [Word8] -&gt; [Word8]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Int
forall a. Enum a =&gt; a -&gt; Int
</span><a href="../../base/src/GHC.Enum.html#fromEnum"><span class="hs-identifier hs-var">fromEnum</span></a></span><span>
</span><span id="line-100"></span><span>
</span><span id="line-101"></span><span id="local-6989586621679059591"><span id="local-6989586621679059592"><span class="annot"><a href="GHC.Serialized.html#deserializeEnum"><span class="hs-identifier hs-type">deserializeEnum</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Enum.html#Enum"><span class="hs-identifier hs-type">Enum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059592"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679059592"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059591"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059591"><span class="hs-identifier hs-type">b</span></a></span></span></span><span>
</span><span id="line-102"></span><span id="deserializeEnum"><span class="annot"><span class="annottext">deserializeEnum :: forall a b. Enum a =&gt; [Word8] -&gt; (a -&gt; [Word8] -&gt; b) -&gt; b
</span><a href="GHC.Serialized.html#deserializeEnum"><span class="hs-identifier hs-var hs-var">deserializeEnum</span></a></span></span><span> </span><span id="local-6989586621679059365"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059365"><span class="hs-identifier hs-var">bytes</span></a></span></span><span> </span><span id="local-6989586621679059364"><span class="annot"><span class="annottext">a -&gt; [Word8] -&gt; b
</span><a href="#local-6989586621679059364"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; (Int -&gt; [Word8] -&gt; b) -&gt; b
forall a. [Word8] -&gt; (Int -&gt; [Word8] -&gt; a) -&gt; a
</span><a href="GHC.Serialized.html#deserializeInt"><span class="hs-identifier hs-var">deserializeInt</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059365"><span class="hs-identifier hs-var">bytes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; [Word8] -&gt; b
</span><a href="#local-6989586621679059364"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; [Word8] -&gt; b) -&gt; (Int -&gt; a) -&gt; Int -&gt; [Word8] -&gt; b
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; a
forall a. Enum a =&gt; Int -&gt; a
</span><a href="../../base/src/GHC.Enum.html#toEnum"><span class="hs-identifier hs-var">toEnum</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-103"></span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span class="annot"><a href="GHC.Serialized.html#serializeWord8"><span class="hs-identifier hs-type">serializeWord8</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-106"></span><span id="serializeWord8"><span class="annot"><span class="annottext">serializeWord8 :: Word8 -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeWord8"><span class="hs-identifier hs-var hs-var">serializeWord8</span></a></span></span><span> </span><span id="local-6989586621679059362"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679059362"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679059362"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">Word8 -&gt; [Word8] -&gt; [Word8]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="hs-special">)</span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span id="local-6989586621679059620"><span class="annot"><a href="GHC.Serialized.html#deserializeWord8"><span class="hs-identifier hs-type">deserializeWord8</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059620"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059620"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-109"></span><span id="deserializeWord8"><span class="annot"><span class="annottext">deserializeWord8 :: forall a. [Word8] -&gt; (Word8 -&gt; [Word8] -&gt; a) -&gt; a
</span><a href="GHC.Serialized.html#deserializeWord8"><span class="hs-identifier hs-var hs-var">deserializeWord8</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679059359"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679059359"><span class="hs-identifier hs-var">byte</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679059358"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059358"><span class="hs-identifier hs-var">bytes</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679059357"><span class="annot"><span class="annottext">Word8 -&gt; [Word8] -&gt; a
</span><a href="#local-6989586621679059357"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; [Word8] -&gt; a
</span><a href="#local-6989586621679059357"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679059359"><span class="hs-identifier hs-var">byte</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059358"><span class="hs-identifier hs-var">bytes</span></a></span><span>
</span><span id="line-110"></span><span class="annot"><a href="GHC.Serialized.html#deserializeWord8"><span class="hs-identifier hs-var">deserializeWord8</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>           </span><span class="annot"><span class="annottext">Word8 -&gt; [Word8] -&gt; a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; a
forall a. HasCallStack =&gt; [Char] -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;deserializeWord8: unexpected end of stream&quot;</span></span><span>
</span><span id="line-111"></span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span class="annot"><a href="GHC.Serialized.html#serializeInt"><span class="hs-identifier hs-type">serializeInt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-114"></span><span id="serializeInt"><span class="annot"><span class="annottext">serializeInt :: Int -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeInt"><span class="hs-identifier hs-var hs-var">serializeInt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [Word8] -&gt; [Word8]
forall a. (Integral a, FiniteBits a) =&gt; a -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeFixedWidthNum"><span class="hs-identifier hs-var">serializeFixedWidthNum</span></a></span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span id="local-6989586621679059619"><span class="annot"><a href="GHC.Serialized.html#deserializeInt"><span class="hs-identifier hs-type">deserializeInt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059619"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059619"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-117"></span><span id="deserializeInt"><span class="annot"><span class="annottext">deserializeInt :: forall a. [Word8] -&gt; (Int -&gt; [Word8] -&gt; a) -&gt; a
</span><a href="GHC.Serialized.html#deserializeInt"><span class="hs-identifier hs-var hs-var">deserializeInt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; (Int -&gt; [Word8] -&gt; a) -&gt; a
forall a b.
(Integral a, FiniteBits a) =&gt;
[Word8] -&gt; (a -&gt; [Word8] -&gt; b) -&gt; b
</span><a href="GHC.Serialized.html#deserializeFixedWidthNum"><span class="hs-identifier hs-var">deserializeFixedWidthNum</span></a></span><span>
</span><span id="line-118"></span><span>
</span><span id="line-119"></span><span>
</span><span id="line-120"></span><span id="local-6989586621679059624"><span class="annot"><a href="GHC.Serialized.html#serializeRational"><span class="hs-identifier hs-type">serializeRational</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Real.html#Real"><span class="hs-identifier hs-type">Real</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059624"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059624"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-121"></span><span id="serializeRational"><span class="annot"><span class="annottext">serializeRational :: forall a. Real a =&gt; a -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeRational"><span class="hs-identifier hs-var hs-var">serializeRational</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeString"><span class="hs-identifier hs-var">serializeString</span></a></span><span> </span><span class="annot"><span class="annottext">([Char] -&gt; [Word8] -&gt; [Word8])
-&gt; (a -&gt; [Char]) -&gt; a -&gt; [Word8] -&gt; [Word8]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Rational -&gt; [Char]
forall a. Show a =&gt; a -&gt; [Char]
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">(Rational -&gt; [Char]) -&gt; (a -&gt; Rational) -&gt; a -&gt; [Char]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Rational
forall a. Real a =&gt; a -&gt; Rational
</span><a href="../../base/src/GHC.Real.html#toRational"><span class="hs-identifier hs-var">toRational</span></a></span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span id="local-6989586621679059616"><span id="local-6989586621679059617"><span class="annot"><a href="GHC.Serialized.html#deserializeRational"><span class="hs-identifier hs-type">deserializeRational</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Real.html#Fractional"><span class="hs-identifier hs-type">Fractional</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059617"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679059617"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059616"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059616"><span class="hs-identifier hs-type">b</span></a></span></span></span><span>
</span><span id="line-124"></span><span id="deserializeRational"><span class="annot"><span class="annottext">deserializeRational :: forall a b. Fractional a =&gt; [Word8] -&gt; (a -&gt; [Word8] -&gt; b) -&gt; b
</span><a href="GHC.Serialized.html#deserializeRational"><span class="hs-identifier hs-var hs-var">deserializeRational</span></a></span></span><span> </span><span id="local-6989586621679059343"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059343"><span class="hs-identifier hs-var">bytes</span></a></span></span><span> </span><span id="local-6989586621679059342"><span class="annot"><span class="annottext">a -&gt; [Word8] -&gt; b
</span><a href="#local-6989586621679059342"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; ([Char] -&gt; [Word8] -&gt; b) -&gt; b
forall a. [Word8] -&gt; ([Char] -&gt; [Word8] -&gt; a) -&gt; a
</span><a href="GHC.Serialized.html#deserializeString"><span class="hs-identifier hs-var">deserializeString</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059343"><span class="hs-identifier hs-var">bytes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; [Word8] -&gt; b
</span><a href="#local-6989586621679059342"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; [Word8] -&gt; b) -&gt; ([Char] -&gt; a) -&gt; [Char] -&gt; [Word8] -&gt; b
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Rational -&gt; a
forall a. Fractional a =&gt; Rational -&gt; a
</span><a href="../../base/src/GHC.Real.html#fromRational"><span class="hs-identifier hs-var">fromRational</span></a></span><span> </span><span class="annot"><span class="annottext">(Rational -&gt; a) -&gt; ([Char] -&gt; Rational) -&gt; [Char] -&gt; a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Rational
forall a. Read a =&gt; [Char] -&gt; a
</span><a href="../../base/src/Text.Read.html#read"><span class="hs-identifier hs-var">read</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-125"></span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span class="annot"><a href="GHC.Serialized.html#serializeInteger"><span class="hs-identifier hs-type">serializeInteger</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-128"></span><span id="serializeInteger"><span class="annot"><span class="annottext">serializeInteger :: Integer -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeInteger"><span class="hs-identifier hs-var hs-var">serializeInteger</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeString"><span class="hs-identifier hs-var">serializeString</span></a></span><span> </span><span class="annot"><span class="annottext">([Char] -&gt; [Word8] -&gt; [Word8])
-&gt; (Integer -&gt; [Char]) -&gt; Integer -&gt; [Word8] -&gt; [Word8]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; [Char]
forall a. Show a =&gt; a -&gt; [Char]
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span>
</span><span id="line-129"></span><span>
</span><span id="line-130"></span><span id="local-6989586621679059618"><span class="annot"><a href="GHC.Serialized.html#deserializeInteger"><span class="hs-identifier hs-type">deserializeInteger</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059618"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059618"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-131"></span><span id="deserializeInteger"><span class="annot"><span class="annottext">deserializeInteger :: forall a. [Word8] -&gt; (Integer -&gt; [Word8] -&gt; a) -&gt; a
</span><a href="GHC.Serialized.html#deserializeInteger"><span class="hs-identifier hs-var hs-var">deserializeInteger</span></a></span></span><span> </span><span id="local-6989586621679059338"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059338"><span class="hs-identifier hs-var">bytes</span></a></span></span><span> </span><span id="local-6989586621679059337"><span class="annot"><span class="annottext">Integer -&gt; [Word8] -&gt; a
</span><a href="#local-6989586621679059337"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; ([Char] -&gt; [Word8] -&gt; a) -&gt; a
forall a. [Word8] -&gt; ([Char] -&gt; [Word8] -&gt; a) -&gt; a
</span><a href="GHC.Serialized.html#deserializeString"><span class="hs-identifier hs-var">deserializeString</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059338"><span class="hs-identifier hs-var">bytes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; [Word8] -&gt; a
</span><a href="#local-6989586621679059337"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">(Integer -&gt; [Word8] -&gt; a)
-&gt; ([Char] -&gt; Integer) -&gt; [Char] -&gt; [Word8] -&gt; a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Integer
forall a. Read a =&gt; [Char] -&gt; a
</span><a href="../../base/src/Text.Read.html#read"><span class="hs-identifier hs-var">read</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span>
</span><span id="line-134"></span><span class="annot"><a href="GHC.Serialized.html#serializeChar"><span class="hs-identifier hs-type">serializeChar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-135"></span><span id="serializeChar"><span class="annot"><span class="annottext">serializeChar :: Char -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeChar"><span class="hs-identifier hs-var hs-var">serializeChar</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeString"><span class="hs-identifier hs-var">serializeString</span></a></span><span> </span><span class="annot"><span class="annottext">([Char] -&gt; [Word8] -&gt; [Word8])
-&gt; (Char -&gt; [Char]) -&gt; Char -&gt; [Word8] -&gt; [Word8]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; [Char]
forall a. Show a =&gt; a -&gt; [Char]
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span>
</span><span id="line-136"></span><span>
</span><span id="line-137"></span><span id="local-6989586621679059615"><span class="annot"><a href="GHC.Serialized.html#deserializeChar"><span class="hs-identifier hs-type">deserializeChar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059615"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059615"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-138"></span><span id="deserializeChar"><span class="annot"><span class="annottext">deserializeChar :: forall a. [Word8] -&gt; (Char -&gt; [Word8] -&gt; a) -&gt; a
</span><a href="GHC.Serialized.html#deserializeChar"><span class="hs-identifier hs-var hs-var">deserializeChar</span></a></span></span><span> </span><span id="local-6989586621679059334"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059334"><span class="hs-identifier hs-var">bytes</span></a></span></span><span> </span><span id="local-6989586621679059333"><span class="annot"><span class="annottext">Char -&gt; [Word8] -&gt; a
</span><a href="#local-6989586621679059333"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; ([Char] -&gt; [Word8] -&gt; a) -&gt; a
forall a. [Word8] -&gt; ([Char] -&gt; [Word8] -&gt; a) -&gt; a
</span><a href="GHC.Serialized.html#deserializeString"><span class="hs-identifier hs-var">deserializeString</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059334"><span class="hs-identifier hs-var">bytes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; [Word8] -&gt; a
</span><a href="#local-6989586621679059333"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">(Char -&gt; [Word8] -&gt; a)
-&gt; ([Char] -&gt; Char) -&gt; [Char] -&gt; [Word8] -&gt; a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Char
forall a. Read a =&gt; [Char] -&gt; a
</span><a href="../../base/src/Text.Read.html#read"><span class="hs-identifier hs-var">read</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-139"></span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span class="annot"><a href="GHC.Serialized.html#serializeString"><span class="hs-identifier hs-type">serializeString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-142"></span><span id="serializeString"><span class="annot"><span class="annottext">serializeString :: [Char] -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeString"><span class="hs-identifier hs-var hs-var">serializeString</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; [Word8] -&gt; [Word8]) -&gt; [Char] -&gt; [Word8] -&gt; [Word8]
forall a. (a -&gt; [Word8] -&gt; [Word8]) -&gt; [a] -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeList"><span class="hs-identifier hs-var">serializeList</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; [Word8] -&gt; [Word8]
forall a. Enum a =&gt; a -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeEnum"><span class="hs-identifier hs-var">serializeEnum</span></a></span><span>
</span><span id="line-143"></span><span>
</span><span id="line-144"></span><span id="local-6989586621679059581"><span class="annot"><a href="GHC.Serialized.html#deserializeString"><span class="hs-identifier hs-type">deserializeString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059581"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059581"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-145"></span><span id="deserializeString"><span class="annot"><span class="annottext">deserializeString :: forall a. [Word8] -&gt; ([Char] -&gt; [Word8] -&gt; a) -&gt; a
</span><a href="GHC.Serialized.html#deserializeString"><span class="hs-identifier hs-var hs-var">deserializeString</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall a. [Word8] -&gt; (Char -&gt; [Word8] -&gt; a) -&gt; a)
-&gt; [Word8] -&gt; ([Char] -&gt; [Word8] -&gt; a) -&gt; a
forall a b.
(forall c. [Word8] -&gt; (a -&gt; [Word8] -&gt; c) -&gt; c)
-&gt; [Word8] -&gt; ([a] -&gt; [Word8] -&gt; b) -&gt; b
</span><a href="GHC.Serialized.html#deserializeList"><span class="hs-identifier hs-var">deserializeList</span></a></span><span> </span><span class="annot"><span class="annottext">forall a. [Word8] -&gt; (Char -&gt; [Word8] -&gt; a) -&gt; a
forall a b. Enum a =&gt; [Word8] -&gt; (a -&gt; [Word8] -&gt; b) -&gt; b
</span><a href="GHC.Serialized.html#deserializeEnum"><span class="hs-identifier hs-var">deserializeEnum</span></a></span><span>
</span><span id="line-146"></span><span>
</span><span id="line-147"></span><span>
</span><span id="line-148"></span><span id="local-6989586621679059576"><span class="annot"><a href="GHC.Serialized.html#serializeList"><span class="hs-identifier hs-type">serializeList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679059576"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679059576"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-149"></span><span id="serializeList"><span class="annot"><span class="annottext">serializeList :: forall a. (a -&gt; [Word8] -&gt; [Word8]) -&gt; [a] -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeList"><span class="hs-identifier hs-var hs-var">serializeList</span></a></span></span><span> </span><span id="local-6989586621679059326"><span class="annot"><span class="annottext">a -&gt; [Word8] -&gt; [Word8]
</span><a href="#local-6989586621679059326"><span class="hs-identifier hs-var">serialize_element</span></a></span></span><span> </span><span id="local-6989586621679059325"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679059325"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [Word8] -&gt; [Word8]
</span><a href="GHC.Serialized.html#serializeInt"><span class="hs-identifier hs-var">serializeInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679059325"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([Word8] -&gt; [Word8]) -&gt; ([Word8] -&gt; [Word8]) -&gt; [Word8] -&gt; [Word8]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(([Word8] -&gt; [Word8])
 -&gt; ([Word8] -&gt; [Word8]) -&gt; [Word8] -&gt; [Word8])
-&gt; ([Word8] -&gt; [Word8])
-&gt; [[Word8] -&gt; [Word8]]
-&gt; [Word8]
-&gt; [Word8]
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">([Word8] -&gt; [Word8]) -&gt; ([Word8] -&gt; [Word8]) -&gt; [Word8] -&gt; [Word8]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">(.)</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; [Word8]
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; [Word8] -&gt; [Word8]) -&gt; [a] -&gt; [[Word8] -&gt; [Word8]]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [Word8] -&gt; [Word8]
</span><a href="#local-6989586621679059326"><span class="hs-identifier hs-var">serialize_element</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679059325"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-150"></span><span>
</span><span id="line-151"></span><span class="annot"><a href="GHC.Serialized.html#deserializeList"><span class="hs-identifier hs-type">deserializeList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621679059574"><span class="annot"><a href="#local-6989586621679059574"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span id="local-6989586621679059572"><span class="annot"><a href="#local-6989586621679059572"><span class="hs-identifier hs-type">b</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="hs-special">(</span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621679059573"><span class="annot"><a href="#local-6989586621679059573"><span class="hs-identifier hs-type">c</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679059574"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059573"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059573"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-152"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679059574"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059572"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059572"><span class="hs-identifier hs-type">b</span></a></span><span>
</span><span id="line-153"></span><span id="deserializeList"><span class="annot"><span class="annottext">deserializeList :: forall a b.
(forall c. [Word8] -&gt; (a -&gt; [Word8] -&gt; c) -&gt; c)
-&gt; [Word8] -&gt; ([a] -&gt; [Word8] -&gt; b) -&gt; b
</span><a href="GHC.Serialized.html#deserializeList"><span class="hs-identifier hs-var hs-var">deserializeList</span></a></span></span><span> </span><span id="local-6989586621679059317"><span class="annot"><span class="annottext">forall c. [Word8] -&gt; (a -&gt; [Word8] -&gt; c) -&gt; c
</span><a href="#local-6989586621679059317"><span class="hs-identifier hs-var">deserialize_element</span></a></span></span><span> </span><span id="local-6989586621679059316"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059316"><span class="hs-identifier hs-var">bytes</span></a></span></span><span> </span><span id="local-6989586621679059315"><span class="annot"><span class="annottext">[a] -&gt; [Word8] -&gt; b
</span><a href="#local-6989586621679059315"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; (Int -&gt; [Word8] -&gt; b) -&gt; b
forall a. [Word8] -&gt; (Int -&gt; [Word8] -&gt; a) -&gt; a
</span><a href="GHC.Serialized.html#deserializeInt"><span class="hs-identifier hs-var">deserializeInt</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059316"><span class="hs-identifier hs-var">bytes</span></a></span><span> </span><span class="annot"><span class="annottext">((Int -&gt; [Word8] -&gt; b) -&gt; b) -&gt; (Int -&gt; [Word8] -&gt; b) -&gt; b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679059314"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679059314"><span class="hs-identifier hs-var">len</span></a></span></span><span> </span><span id="local-6989586621679059313"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059313"><span class="hs-identifier hs-var">bytes</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [Word8] -&gt; ([a] -&gt; [Word8] -&gt; b) -&gt; b
</span><a href="#local-6989586621679059312"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679059314"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059313"><span class="hs-identifier hs-var">bytes</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [Word8] -&gt; b
</span><a href="#local-6989586621679059315"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-154"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-155"></span><span>    </span><span class="annot"><a href="#local-6989586621679059312"><span class="hs-identifier hs-type">go</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679059574"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059572"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059572"><span class="hs-identifier hs-type">b</span></a></span><span>
</span><span id="line-156"></span><span>    </span><span id="local-6989586621679059312"><span class="annot"><span class="annottext">go :: Int -&gt; [Word8] -&gt; ([a] -&gt; [Word8] -&gt; b) -&gt; b
</span><a href="#local-6989586621679059312"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679059311"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679059311"><span class="hs-identifier hs-var">len</span></a></span></span><span> </span><span id="local-6989586621679059310"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059310"><span class="hs-identifier hs-var">bytes</span></a></span></span><span> </span><span id="local-6989586621679059309"><span class="annot"><span class="annottext">[a] -&gt; [Word8] -&gt; b
</span><a href="#local-6989586621679059309"><span class="hs-identifier hs-var">k</span></a></span></span><span>
</span><span id="line-157"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679059311"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [Word8] -&gt; b
</span><a href="#local-6989586621679059309"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059310"><span class="hs-identifier hs-var">bytes</span></a></span><span>
</span><span id="line-158"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; (a -&gt; [Word8] -&gt; b) -&gt; b
forall c. [Word8] -&gt; (a -&gt; [Word8] -&gt; c) -&gt; c
</span><a href="#local-6989586621679059317"><span class="hs-identifier hs-var">deserialize_element</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059310"><span class="hs-identifier hs-var">bytes</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679059308"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059308"><span class="hs-identifier hs-var">elt</span></a></span></span><span> </span><span id="local-6989586621679059307"><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059307"><span class="hs-identifier hs-var">bytes</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [Word8] -&gt; ([a] -&gt; [Word8] -&gt; b) -&gt; b
</span><a href="#local-6989586621679059312"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679059311"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Word8]
</span><a href="#local-6989586621679059307"><span class="hs-identifier hs-var">bytes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; [Word8] -&gt; b
</span><a href="#local-6989586621679059309"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">([a] -&gt; [Word8] -&gt; b) -&gt; ([a] -&gt; [a]) -&gt; [a] -&gt; [Word8] -&gt; b
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059308"><span class="hs-identifier hs-var">elt</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-159"></span></pre></body></html>